package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 文章对象 b_posts
 * 
 * @author ruoyi
 * @date 2025-07-03
 */
public class BPosts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 文章内容 */
    @Excel(name = "文章内容")
    private String content;

    /** 封面图片 */
    private String coverImg;

    /** 摘要 */
    @Excel(name = "摘要")
    private String excerpt;

    /** （0=草稿，1=已发布，2=已删除） */
    @Excel(name = "", readConverterExp = "0==草稿，1=已发布，2=已删除")
    private Long pStatus;

    private String tag;

    /** 标签id列表 */
    private List<String> tagCodes;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishedTime;

    /** 浏览数 */
    @Excel(name = "浏览数")
    private Long viewCount;

    private String imgUrl;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setExcerpt(String excerpt) 
    {
        this.excerpt = excerpt;
    }

    public String getExcerpt() 
    {
        return excerpt;
    }

    public void setpStatus(Long pStatus) 
    {
        this.pStatus = pStatus;
    }

    public Long getpStatus() 
    {
        return pStatus;
    }

    public void setPublishedTime(Date publishedTime) 
    {
        this.publishedTime = publishedTime;
    }

    public Date getPublishedTime() 
    {
        return publishedTime;
    }

    public void setViewCount(Long viewCount) 
    {
        this.viewCount = viewCount;
    }

    public Long getViewCount() 
    {
        return viewCount;
    }

    public List<String> getTagCodes() {
        return tagCodes;
    }

    public void setTagCodes(List<String> tagCodes) {
        this.tagCodes = tagCodes;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getCoverImg() {
        return coverImg;
    }

    public void setCoverImg(String coverImg) {
        this.coverImg = coverImg;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("excerpt", getExcerpt())
            .append("pStatus", getpStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("publishedTime", getPublishedTime())
            .append("remark", getRemark())
            .append("viewCount", getViewCount())
            .toString();
    }
}
